/**
 * Copyright 2008-2009 HAN.BIFANG
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
package han.bifang.gwt.client.common;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * 
 * @Author Kent
 */
public class JmsSupport {
	private static HashMap<String,String> supportProvider = new HashMap<String,String>();
	private static HashMap<String,ArrayList<String>> supportVer = new HashMap<String,ArrayList<String>>();
	
	
	static{
		supportProvider.put("WebLogic", "WebLogic");
		supportProvider.put("WebSphere", "WebSphere");
		supportProvider.put("WebSphere MQ", "WebSphere MQ");
		supportProvider.put("JBoss", "JBoss");
		supportProvider.put("GlassFish", "GlassFish");
		
		
		ArrayList<String> v = new ArrayList<String>();
		v.add("10.x");
		v.add("9.x");
		
		supportVer.put("WebLogic", v);
		
		v = new ArrayList<String>();
		v.add("7.x");
		v.add("6.x");
		
		supportVer.put("WebSphere", v);
		
		v = new ArrayList<String>();
		v.add("5.x");
		v.add("4.x");
		
		supportVer.put("JBoss", v);
		
		v = new ArrayList<String>();
		v.add("3.x");
		v.add("2.x");
		
		supportVer.put("GlassFish", v);	
		
		v = new ArrayList<String>();
		v.add("7.x");
		v.add("6.x");
		v.add("5.x");
		
		supportVer.put("WebSphere MQ", v);	
		
		
	}
	
	public static String[] getSupportProviderNameList(){
		String[] ser = new String[]{"WebLogic","WebSphere","WebSphere MQ","JBoss","GlassFish"};
		
		return ser;
		
	}
	
	public static String getProvidersValue(String name){
		return supportProvider.get(name);
	}
	
	public static ArrayList<String> getSupportVersion(String server){
		return supportVer.get(server);
	}
	

}
